<template>
  <div class="home-container">
    home
    <ul class="routes-list">
      <li v-for="item in routes" :key="item.name">
           {{ item }}
      </li>
    </ul>

    
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  computed: {
    routes() {
      let tempArray =[]
      this.$router.options.routes.map(function(item){
          if(item.children){
             item.children.map(function(val){
               tempArray.push(val)
             })
          }else{
            tempArray.push(item)
          }
      })
      return tempArray
    },
  },
  created() {},
  mounted() {},
  methods: {},
};
</script>

<style scoped lang='less'>
.routes-list{
  li{
    padding: 10px;
  }
}
</style>
